import {
  imageUrl
} from "../../utils/imageutil"
Component({
  externalClasses: ["lack-class", "lacktxt-class"],
  properties: {
    show: {
      type: Boolean,
      value: false
    },
    zIndex:{
      type: Number,
      value: -1,
    },
    is_fixed: {
      type: Boolean,
      value: false
    },
    image: {
      type: String,
      value: imageUrl + '/merchant/lack.png'
    },
    title: {
      type: String,
      value: '暂无内容呢～'
    },
    type: {
      type: Number,
      value: ''
    },
    width:{
      type: String,
      value: '100%'
    },
    height:{
      type: String,
      value: '100vh'
    },
    left:{
      type: String,
      value: '0'
    },
    top:{
      type: String,
      value: '0'
    },
  },

  data: {
    imageUrl
  },
  methods: {

  },
  lifetimes: {
    ready: function () {
      if (this.data.type) {
        let type = this.data.type
        switch (type) {
          case 1:
            this.setData({
              image: imageUrl + '/default/no_kaifa.png',
              title: '该功能开发中～'
            })
            break;
          case 2:
            this.setData({
              image: imageUrl + '/default/no_follow.png',
              title: '还没有关注，赶快去关注一波吧～'
            })
            break;
          case 3:
            this.setData({
              image: imageUrl + '/default/no_collection.png',
              title: '暂时没有收藏哦～'
            })
            break;
          case 4:
            this.setData({
              image: imageUrl + '/default/no_data.png',
              title: '暂无数据哦～'
            })
            break;
          case 5:
            this.setData({
              image: imageUrl + '/default/no_network.png',
              title: '网络请求失败，请检查网络是否正常～'
            })
            break;
          case 6:
            this.setData({
              image: imageUrl + '/default/no_order.png',
              title: '暂时没有订单哦～'
            })
            break;
          case 7:
            this.setData({
              image: imageUrl + '/default/no_notice.png',
              title: '暂时没有通知哦～'
            })
            break;
          case 8:
            this.setData({
              image: imageUrl + '/default/no_news.png',
              title: '还没有信息哦～'
            })
            break;
          case 9:
            this.setData({
              image: imageUrl + '/default/no_data.png',
              title: '暂无课程哦～'
            })
            break;
          default:
            break;
        }
      }
    },
  }

})